# Date: 2021/10/14
# Usage: 将crnn模型pth改为onnx
import ocr.params as params
# from ocr.crnn_nets.crnn import crnnRecWithBox, CRnn, CRNNHandle
from ocr.crnn_nets.crnn_onnx import crnnRecWithBox, CRNNHandle, get_rotate_crop_image

# pth
# crnn_net = CRnn(32, 1, len(params.alphabet)+1, nh=256, n_rnn=2, leakyRelu=False)
# crnn_handle = CRNNHandle(params.crnn_model_path, crnn_net, gpu_id=None)

# onnx
crnn_handle = CRNNHandle(params.crnn_model_path)